import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/mes-qms/qms_lock_route/page',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  });
};

export const partLock = (data) => {
  return request({
    url: '/api/mes-qms/qms_lock_route/lock',
    method: 'post',
    data
  });
};

export const unLock = (data) => {
  return request({
    url: '/api/mes-qms/qms_lock_route/unlock',
    method: 'post',
    data
  });
};

// 根据工单id查询工序列表
export const getRoutesByWo = (workorderId) => {
  return request({
    url: '/api/mes-product/process/product-route/workorder-routes',
    method: 'get',
    params: {
      workorderId
    }
  });
};
